\(\int x^2 (a+b x^2) \cosh (c+d x) \, dx\) [41]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 109 \[ \int x^2 \left (a+b x^2\right ) \cosh (c+d x) \, dx=-\frac {24 b x \cosh (c+d x)}{d^4}-\frac {2 a x \cosh (c+d x)}{d^2}-\frac {4 b x^3 \cosh (c+d x)}{d^2}+\frac {24 b \sinh (c+d x)}{d^5}+\frac {2 a \sinh (c+d x)}{d^3}+\frac {12 b x^2 \sinh (c+d x)}{d^3}+\frac {a x^2 \sinh (c+d x)}{d}+\frac {b x^4 \sinh (c+d x)}{d} \]

[Out]

-24*b*x*cosh(d*x+c)/d^4-2*a*x*cosh(d*x+c)/d^2-4*b*x^3*cosh(d*x+c)/d^2+24*b*sinh(d*x+c)/d^5+2*a*sinh(d*x+c)/d^3
+12*b*x^2*sinh(d*x+c)/d^3+a*x^2*sinh(d*x+c)/d+b*x^4*sinh(d*x+c)/d

Rubi [A] (verified)

Time = 0.14 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {5395, 3377, 2717} \[ \int x^2 \left (a+b x^2\right ) \cosh (c+d x) \, dx=\frac {2 a \sinh (c+d x)}{d^3}-\frac {2 a x \cosh (c+d x)}{d^2}+\frac {a x^2 \sinh (c+d x)}{d}+\frac {24 b \sinh (c+d x)}{d^5}-\frac {24 b x \cosh (c+d x)}{d^4}+\frac {12 b x^2 \sinh (c+d x)}{d^3}-\frac {4 b x^3 \cosh (c+d x)}{d^2}+\frac {b x^4 \sinh (c+d x)}{d} \]

[In]

Int[x^2*(a + b*x^2)*Cosh[c + d*x],x]

[Out]

(-24*b*x*Cosh[c + d*x])/d^4 - (2*a*x*Cosh[c + d*x])/d^2 - (4*b*x^3*Cosh[c + d*x])/d^2 + (24*b*Sinh[c + d*x])/d
^5 + (2*a*Sinh[c + d*x])/d^3 + (12*b*x^2*Sinh[c + d*x])/d^3 + (a*x^2*Sinh[c + d*x])/d + (b*x^4*Sinh[c + d*x])/
d

Rule 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 5395

Int[Cosh[(c_.) + (d_.)*(x_)]*((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[Cosh[c + d*x], (e*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]

Rubi steps \begin{align*} \text {integral}& = \int \left (a x^2 \cosh (c+d x)+b x^4 \cosh (c+d x)\right ) \, dx \\ & = a \int x^2 \cosh (c+d x) \, dx+b \int x^4 \cosh (c+d x) \, dx \\ & = \frac {a x^2 \sinh (c+d x)}{d}+\frac {b x^4 \sinh (c+d x)}{d}-\frac {(2 a) \int x \sinh (c+d x) \, dx}{d}-\frac {(4 b) \int x^3 \sinh (c+d x) \, dx}{d} \\ & = -\frac {2 a x \cosh (c+d x)}{d^2}-\frac {4 b x^3 \cosh (c+d x)}{d^2}+\frac {a x^2 \sinh (c+d x)}{d}+\frac {b x^4 \sinh (c+d x)}{d}+\frac {(2 a) \int \cosh (c+d x) \, dx}{d^2}+\frac {(12 b) \int x^2 \cosh (c+d x) \, dx}{d^2} \\ & = -\frac {2 a x \cosh (c+d x)}{d^2}-\frac {4 b x^3 \cosh (c+d x)}{d^2}+\frac {2 a \sinh (c+d x)}{d^3}+\frac {12 b x^2 \sinh (c+d x)}{d^3}+\frac {a x^2 \sinh (c+d x)}{d}+\frac {b x^4 \sinh (c+d x)}{d}-\frac {(24 b) \int x \sinh (c+d x) \, dx}{d^3} \\ & = -\frac {24 b x \cosh (c+d x)}{d^4}-\frac {2 a x \cosh (c+d x)}{d^2}-\frac {4 b x^3 \cosh (c+d x)}{d^2}+\frac {2 a \sinh (c+d x)}{d^3}+\frac {12 b x^2 \sinh (c+d x)}{d^3}+\frac {a x^2 \sinh (c+d x)}{d}+\frac {b x^4 \sinh (c+d x)}{d}+\frac {(24 b) \int \cosh (c+d x) \, dx}{d^4} \\ & = -\frac {24 b x \cosh (c+d x)}{d^4}-\frac {2 a x \cosh (c+d x)}{d^2}-\frac {4 b x^3 \cosh (c+d x)}{d^2}+\frac {24 b \sinh (c+d x)}{d^5}+\frac {2 a \sinh (c+d x)}{d^3}+\frac {12 b x^2 \sinh (c+d x)}{d^3}+\frac {a x^2 \sinh (c+d x)}{d}+\frac {b x^4 \sinh (c+d x)}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.68 \[ \int x^2 \left (a+b x^2\right ) \cosh (c+d x) \, dx=\frac {-2 d x \left (a d^2+2 b \left (6+d^2 x^2\right )\right ) \cosh (c+d x)+\left (a d^2 \left (2+d^2 x^2\right )+b \left (24+12 d^2 x^2+d^4 x^4\right )\right ) \sinh (c+d x)}{d^5} \]

[In]

Integrate[x^2*(a + b*x^2)*Cosh[c + d*x],x]

[Out]

(-2*d*x*(a*d^2 + 2*b*(6 + d^2*x^2))*Cosh[c + d*x] + (a*d^2*(2 + d^2*x^2) + b*(24 + 12*d^2*x^2 + d^4*x^4))*Sinh
[c + d*x])/d^5

Maple [A] (verified)

Time = 0.11 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.07

method result size
parallelrisch \(\frac {2 d \left (\left (2 b \,x^{2}+a \right ) d^{2}+12 b \right ) x \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+2 \left (\left (-b \,x^{4}-a \,x^{2}\right ) d^{4}+2 \left (-6 b \,x^{2}-a \right ) d^{2}-24 b \right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+2 d \left (\left (2 b \,x^{2}+a \right ) d^{2}+12 b \right ) x}{d^{5} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )}\) \(117\)
risch \(\frac {\left (b \,x^{4} d^{4}+a \,d^{4} x^{2}-4 b \,d^{3} x^{3}-2 a \,d^{3} x +12 b \,d^{2} x^{2}+2 a \,d^{2}-24 d x b +24 b \right ) {\mathrm e}^{d x +c}}{2 d^{5}}-\frac {\left (b \,x^{4} d^{4}+a \,d^{4} x^{2}+4 b \,d^{3} x^{3}+2 a \,d^{3} x +12 b \,d^{2} x^{2}+2 a \,d^{2}+24 d x b +24 b \right ) {\mathrm e}^{-d x -c}}{2 d^{5}}\) \(139\)
parts \(\frac {b \,x^{4} \sinh \left (d x +c \right )}{d}+\frac {a \,x^{2} \sinh \left (d x +c \right )}{d}-\frac {2 \left (-\frac {2 b \,c^{3} \cosh \left (d x +c \right )}{d^{3}}+\frac {6 b \,c^{2} \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )}{d^{3}}-\frac {6 b c \left (\left (d x +c \right )^{2} \cosh \left (d x +c \right )-2 \left (d x +c \right ) \sinh \left (d x +c \right )+2 \cosh \left (d x +c \right )\right )}{d^{3}}+\frac {2 b \left (\left (d x +c \right )^{3} \cosh \left (d x +c \right )-3 \left (d x +c \right )^{2} \sinh \left (d x +c \right )+6 \left (d x +c \right ) \cosh \left (d x +c \right )-6 \sinh \left (d x +c \right )\right )}{d^{3}}+\frac {a \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )}{d}-\frac {a c \cosh \left (d x +c \right )}{d}\right )}{d^{2}}\) \(220\)
meijerg \(-\frac {16 i b \cosh \left (c \right ) \sqrt {\pi }\, \left (-\frac {i x d \left (\frac {5 x^{2} d^{2}}{2}+15\right ) \cosh \left (d x \right )}{10 \sqrt {\pi }}+\frac {i \left (\frac {5}{8} d^{4} x^{4}+\frac {15}{2} x^{2} d^{2}+15\right ) \sinh \left (d x \right )}{10 \sqrt {\pi }}\right )}{d^{5}}-\frac {16 b \sinh \left (c \right ) \sqrt {\pi }\, \left (\frac {3}{2 \sqrt {\pi }}-\frac {\left (\frac {3}{8} d^{4} x^{4}+\frac {9}{2} x^{2} d^{2}+9\right ) \cosh \left (d x \right )}{6 \sqrt {\pi }}+\frac {x d \left (\frac {3 x^{2} d^{2}}{2}+9\right ) \sinh \left (d x \right )}{6 \sqrt {\pi }}\right )}{d^{5}}+\frac {4 i a \cosh \left (c \right ) \sqrt {\pi }\, \left (\frac {i x d \cosh \left (d x \right )}{2 \sqrt {\pi }}-\frac {i \left (\frac {3 x^{2} d^{2}}{2}+3\right ) \sinh \left (d x \right )}{6 \sqrt {\pi }}\right )}{d^{3}}+\frac {4 a \sinh \left (c \right ) \sqrt {\pi }\, \left (-\frac {1}{2 \sqrt {\pi }}+\frac {\left (\frac {x^{2} d^{2}}{2}+1\right ) \cosh \left (d x \right )}{2 \sqrt {\pi }}-\frac {d x \sinh \left (d x \right )}{2 \sqrt {\pi }}\right )}{d^{3}}\) \(222\)
derivativedivides \(\frac {\frac {b \,c^{4} \sinh \left (d x +c \right )}{d^{2}}-\frac {4 b \,c^{3} \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )}{d^{2}}+\frac {6 b \,c^{2} \left (\left (d x +c \right )^{2} \sinh \left (d x +c \right )-2 \left (d x +c \right ) \cosh \left (d x +c \right )+2 \sinh \left (d x +c \right )\right )}{d^{2}}-\frac {4 b c \left (\left (d x +c \right )^{3} \sinh \left (d x +c \right )-3 \left (d x +c \right )^{2} \cosh \left (d x +c \right )+6 \left (d x +c \right ) \sinh \left (d x +c \right )-6 \cosh \left (d x +c \right )\right )}{d^{2}}+\frac {b \left (\left (d x +c \right )^{4} \sinh \left (d x +c \right )-4 \left (d x +c \right )^{3} \cosh \left (d x +c \right )+12 \left (d x +c \right )^{2} \sinh \left (d x +c \right )-24 \left (d x +c \right ) \cosh \left (d x +c \right )+24 \sinh \left (d x +c \right )\right )}{d^{2}}+a \,c^{2} \sinh \left (d x +c \right )-2 a c \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )+a \left (\left (d x +c \right )^{2} \sinh \left (d x +c \right )-2 \left (d x +c \right ) \cosh \left (d x +c \right )+2 \sinh \left (d x +c \right )\right )}{d^{3}}\) \(298\)
default \(\frac {\frac {b \,c^{4} \sinh \left (d x +c \right )}{d^{2}}-\frac {4 b \,c^{3} \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )}{d^{2}}+\frac {6 b \,c^{2} \left (\left (d x +c \right )^{2} \sinh \left (d x +c \right )-2 \left (d x +c \right ) \cosh \left (d x +c \right )+2 \sinh \left (d x +c \right )\right )}{d^{2}}-\frac {4 b c \left (\left (d x +c \right )^{3} \sinh \left (d x +c \right )-3 \left (d x +c \right )^{2} \cosh \left (d x +c \right )+6 \left (d x +c \right ) \sinh \left (d x +c \right )-6 \cosh \left (d x +c \right )\right )}{d^{2}}+\frac {b \left (\left (d x +c \right )^{4} \sinh \left (d x +c \right )-4 \left (d x +c \right )^{3} \cosh \left (d x +c \right )+12 \left (d x +c \right )^{2} \sinh \left (d x +c \right )-24 \left (d x +c \right ) \cosh \left (d x +c \right )+24 \sinh \left (d x +c \right )\right )}{d^{2}}+a \,c^{2} \sinh \left (d x +c \right )-2 a c \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )+a \left (\left (d x +c \right )^{2} \sinh \left (d x +c \right )-2 \left (d x +c \right ) \cosh \left (d x +c \right )+2 \sinh \left (d x +c \right )\right )}{d^{3}}\) \(298\)

[In]

int(x^2*(b*x^2+a)*cosh(d*x+c),x,method=_RETURNVERBOSE)

[Out]

2*(d*((2*b*x^2+a)*d^2+12*b)*x*tanh(1/2*d*x+1/2*c)^2+((-b*x^4-a*x^2)*d^4+2*(-6*b*x^2-a)*d^2-24*b)*tanh(1/2*d*x+
1/2*c)+d*((2*b*x^2+a)*d^2+12*b)*x)/d^5/(tanh(1/2*d*x+1/2*c)^2-1)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.72 \[ \int x^2 \left (a+b x^2\right ) \cosh (c+d x) \, dx=-\frac {2 \, {\left (2 \, b d^{3} x^{3} + {\left (a d^{3} + 12 \, b d\right )} x\right )} \cosh \left (d x + c\right ) - {\left (b d^{4} x^{4} + 2 \, a d^{2} + {\left (a d^{4} + 12 \, b d^{2}\right )} x^{2} + 24 \, b\right )} \sinh \left (d x + c\right )}{d^{5}} \]

[In]

integrate(x^2*(b*x^2+a)*cosh(d*x+c),x, algorithm="fricas")

[Out]

-(2*(2*b*d^3*x^3 + (a*d^3 + 12*b*d)*x)*cosh(d*x + c) - (b*d^4*x^4 + 2*a*d^2 + (a*d^4 + 12*b*d^2)*x^2 + 24*b)*s
inh(d*x + c))/d^5

Sympy [A] (verification not implemented)

Time = 0.36 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.23 \[ \int x^2 \left (a+b x^2\right ) \cosh (c+d x) \, dx=\begin {cases} \frac {a x^{2} \sinh {\left (c + d x \right )}}{d} - \frac {2 a x \cosh {\left (c + d x \right )}}{d^{2}} + \frac {2 a \sinh {\left (c + d x \right )}}{d^{3}} + \frac {b x^{4} \sinh {\left (c + d x \right )}}{d} - \frac {4 b x^{3} \cosh {\left (c + d x \right )}}{d^{2}} + \frac {12 b x^{2} \sinh {\left (c + d x \right )}}{d^{3}} - \frac {24 b x \cosh {\left (c + d x \right )}}{d^{4}} + \frac {24 b \sinh {\left (c + d x \right )}}{d^{5}} & \text {for}\: d \neq 0 \\\left (\frac {a x^{3}}{3} + \frac {b x^{5}}{5}\right ) \cosh {\left (c \right )} & \text {otherwise} \end {cases} \]

[In]

integrate(x**2*(b*x**2+a)*cosh(d*x+c),x)

[Out]

Piecewise((a*x**2*sinh(c + d*x)/d - 2*a*x*cosh(c + d*x)/d**2 + 2*a*sinh(c + d*x)/d**3 + b*x**4*sinh(c + d*x)/d
 - 4*b*x**3*cosh(c + d*x)/d**2 + 12*b*x**2*sinh(c + d*x)/d**3 - 24*b*x*cosh(c + d*x)/d**4 + 24*b*sinh(c + d*x)
/d**5, Ne(d, 0)), ((a*x**3/3 + b*x**5/5)*cosh(c), True))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.96 \[ \int x^2 \left (a+b x^2\right ) \cosh (c+d x) \, dx=-\frac {1}{30} \, d {\left (\frac {5 \, {\left (d^{3} x^{3} e^{c} - 3 \, d^{2} x^{2} e^{c} + 6 \, d x e^{c} - 6 \, e^{c}\right )} a e^{\left (d x\right )}}{d^{4}} + \frac {5 \, {\left (d^{3} x^{3} + 3 \, d^{2} x^{2} + 6 \, d x + 6\right )} a e^{\left (-d x - c\right )}}{d^{4}} + \frac {3 \, {\left (d^{5} x^{5} e^{c} - 5 \, d^{4} x^{4} e^{c} + 20 \, d^{3} x^{3} e^{c} - 60 \, d^{2} x^{2} e^{c} + 120 \, d x e^{c} - 120 \, e^{c}\right )} b e^{\left (d x\right )}}{d^{6}} + \frac {3 \, {\left (d^{5} x^{5} + 5 \, d^{4} x^{4} + 20 \, d^{3} x^{3} + 60 \, d^{2} x^{2} + 120 \, d x + 120\right )} b e^{\left (-d x - c\right )}}{d^{6}}\right )} + \frac {1}{15} \, {\left (3 \, b x^{5} + 5 \, a x^{3}\right )} \cosh \left (d x + c\right ) \]

[In]

integrate(x^2*(b*x^2+a)*cosh(d*x+c),x, algorithm="maxima")

[Out]

-1/30*d*(5*(d^3*x^3*e^c - 3*d^2*x^2*e^c + 6*d*x*e^c - 6*e^c)*a*e^(d*x)/d^4 + 5*(d^3*x^3 + 3*d^2*x^2 + 6*d*x +
6)*a*e^(-d*x - c)/d^4 + 3*(d^5*x^5*e^c - 5*d^4*x^4*e^c + 20*d^3*x^3*e^c - 60*d^2*x^2*e^c + 120*d*x*e^c - 120*e
^c)*b*e^(d*x)/d^6 + 3*(d^5*x^5 + 5*d^4*x^4 + 20*d^3*x^3 + 60*d^2*x^2 + 120*d*x + 120)*b*e^(-d*x - c)/d^6) + 1/
15*(3*b*x^5 + 5*a*x^3)*cosh(d*x + c)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.27 \[ \int x^2 \left (a+b x^2\right ) \cosh (c+d x) \, dx=\frac {{\left (b d^{4} x^{4} + a d^{4} x^{2} - 4 \, b d^{3} x^{3} - 2 \, a d^{3} x + 12 \, b d^{2} x^{2} + 2 \, a d^{2} - 24 \, b d x + 24 \, b\right )} e^{\left (d x + c\right )}}{2 \, d^{5}} - \frac {{\left (b d^{4} x^{4} + a d^{4} x^{2} + 4 \, b d^{3} x^{3} + 2 \, a d^{3} x + 12 \, b d^{2} x^{2} + 2 \, a d^{2} + 24 \, b d x + 24 \, b\right )} e^{\left (-d x - c\right )}}{2 \, d^{5}} \]

[In]

integrate(x^2*(b*x^2+a)*cosh(d*x+c),x, algorithm="giac")

[Out]

1/2*(b*d^4*x^4 + a*d^4*x^2 - 4*b*d^3*x^3 - 2*a*d^3*x + 12*b*d^2*x^2 + 2*a*d^2 - 24*b*d*x + 24*b)*e^(d*x + c)/d
^5 - 1/2*(b*d^4*x^4 + a*d^4*x^2 + 4*b*d^3*x^3 + 2*a*d^3*x + 12*b*d^2*x^2 + 2*a*d^2 + 24*b*d*x + 24*b)*e^(-d*x
- c)/d^5

Mupad [B] (verification not implemented)

Time = 1.60 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.85 \[ \int x^2 \left (a+b x^2\right ) \cosh (c+d x) \, dx=\frac {2\,\mathrm {sinh}\left (c+d\,x\right )\,\left (a\,d^2+12\,b\right )}{d^5}+\frac {x^2\,\mathrm {sinh}\left (c+d\,x\right )\,\left (a\,d^2+12\,b\right )}{d^3}-\frac {2\,x\,\mathrm {cosh}\left (c+d\,x\right )\,\left (a\,d^2+12\,b\right )}{d^4}-\frac {4\,b\,x^3\,\mathrm {cosh}\left (c+d\,x\right )}{d^2}+\frac {b\,x^4\,\mathrm {sinh}\left (c+d\,x\right )}{d} \]

[In]

int(x^2*cosh(c + d*x)*(a + b*x^2),x)

[Out]

(2*sinh(c + d*x)*(12*b + a*d^2))/d^5 + (x^2*sinh(c + d*x)*(12*b + a*d^2))/d^3 - (2*x*cosh(c + d*x)*(12*b + a*d
^2))/d^4 - (4*b*x^3*cosh(c + d*x))/d^2 + (b*x^4*sinh(c + d*x))/d